<?php 
$quotes = $this->Session->read('Quotes');
if (empty($quotes)){
  $quotes = $this->requestAction(array('controller'=>'Data', 'action'=>'quotes'));
} ?>

<div id="header" class="row-fluid">
    <div class="row-fluid">
      <div class="span3 offset9" id="headerLinks">
        Hi <?php echo "Logged in user"; ?> | <?php echo $this->Html->link("Log out",'/logout', array("class"=>"specialLink"));?>
      </div>
    </div>
  <div class="row-fluid">
  <div id="header-logo" class="span4 offset1"><?php echo $this->Html->image('header-logo2.png',array("title"=>"Isle Vow of Trinidad and Tobago", "alt"=>"Isle Vow of Trinidad and Tobago"));?></div>
  <div class="span5">
        <?php if(!empty($quotes)) {
        $index = array_rand($quotes,1);
        $quote = $quotes[$index]['Quote'];
        ?>
        <span id="header-quote-text"><span class="quotes">"  </span><?php echo $quote['quote'];?><span class="quotes">  "</span></span>
        <span id="header-quote-author"><?php if (!empty($quote['author'])) { echo '~'.$quote['author'] . '~';} ?></span>
        <?php } ?>
  </div>
  </div>
</div>